<%@ include file="/inc/top.jsp"%>
<%@ page import="com.novix.portal.framework.util.IConstants"%>
<%@ page import="java.util.List"%>
<%@ page import="java.util.Iterator"%>
<%@ page import="lotus.domino.Document"%>
<%@ page import="com.novix.portal.framework.model.impl.WebOrganization"%>
<%@ page import="com.novix.portal.framework.util.UserContainer" %>
<%@ page import="com.novix.portal.framework.model.impl.WebContact" %>
<%@ page import="java.util.ArrayList" %>
<html:form action="/domino/pictureGallery">
	<%
		List list = (List)session.getAttribute(IConstants.WEB_CONTACT_UNIQUE_LIST);
		if(request.getParameter("id")!=null){
		String id = request.getParameter("id");
		List alphaList = new ArrayList();
	     for (Iterator iter = list.iterator(); iter.hasNext();) {
            WebContact element = (WebContact) iter.next();            
            if (element.getCompanyName()!=null && element.getCompanyName().toUpperCase().startsWith(id))
                alphaList.add(element);
        	}
        	request.setAttribute(IConstants.WEB_CONTACT_UNIQUE_LIST,alphaList);
        }
        else
			request.setAttribute(IConstants.WEB_CONTACT_UNIQUE_LIST,list);
	%>			
	<display:table name="<%=IConstants.WEB_CONTACT_UNIQUE_LIST %>" export="true" class="<%=uc.getUser().getCaptive().toLowerCase()%>" > 
		 <display:caption><%="Company Links for " + uc.getUser().getCaptive() + " Captives "%></display:caption>	
		<display:setProperty name="export.xml" value="false" />	
		<display:setProperty name="export.csv" value="false" />	
		<display:setProperty name="export.pdf" value="false" />			
		<display:column property="companyName" title="Company Name" sortable="true" href="<%=basePath+"do/domino/viewContacts"%>"  paramId="id" paramProperty="companyName"    />	
	</display:table>
</html:form>

<DIV align="center"> 
	<a href="<%=basePath%>/do/domino/pictureGallery">All</A> 
	<br>
	<%
	for (char letter='A'; letter<='Z'; letter++) { 
	  out.print("<a href=" + basePath + "/do/domino/pictureGallery?id="+letter+">"+letter+"</A>&nbsp;"); 
  	} 
	%>
</DIV>
<%@ include file="/inc/footer.jsp"%>
